import axios from './request';

export default {
  getItems() {
    return axios.get('/items');
  },
  addItems(data) {
    return axios.post('/items', data);
  },
  editItems(id, data) {
    return axios.put(`/items/${id}`, data);
  },
  deleteItems(id) {
    return axios.delete(`/items/${id}`);
  },
  itemsExist(data) {
    return axios.get('/items/exist', {
      params: data,
    });
  },
  sortItems(fid, sid) {
    return axios.put(`/items/sort/${fid}/${sid}`);
  },
};
